//
//  FoundTitleCollectionReusableView.m
//  TodatPlay
//
//  Created by dllo on 16/8/30.
//  Copyright © 2016年 DM.C. All rights reserved.
//

#import "FoundTitleCollectionReusableView.h"
#import "Masonry.h"
@implementation FoundTitleCollectionReusableView
- (instancetype)initWithFrame:(CGRect)frame {
    self = [super initWithFrame:frame];
    if (self) {
        self.labelTitle = [[UILabel alloc] init];
        [self addSubview:self.labelTitle];
        self.labelTitle.text = @"热门搜索";
        self.labelTitle.textAlignment = NSTextAlignmentCenter;
        UIView *leftView = [[UIView alloc] init];
        UIView *rightView = [UIView new];
        leftView.backgroundColor = [UIColor blackColor];
        rightView.backgroundColor = [UIColor blackColor];
        [self addSubview:leftView];
        [self addSubview:rightView];
        [_labelTitle mas_makeConstraints:^(MASConstraintMaker *make) {
            make.centerX.centerY.mas_equalTo(self);
            make.height.mas_equalTo(self.mas_height);
        }];
        [leftView mas_makeConstraints:^(MASConstraintMaker *make) {
            make.right.mas_equalTo(self.labelTitle.mas_left).mas_offset(-10);
            make.centerY.mas_equalTo(self.labelTitle);
            make.width.mas_equalTo(10);
            make.height.mas_equalTo(1.5);
        }];
        [rightView mas_makeConstraints:^(MASConstraintMaker *make) {
            make.left.mas_equalTo(self.labelTitle.mas_right).mas_offset(10);
            make.centerY.mas_equalTo(self.labelTitle);
            make.width.mas_equalTo(10);
            make.height.mas_equalTo(1.5);
        }];
    }
    return self;
}
@end
